'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;

    app.beforeStart(async() => {
        // await app.model.sync({ alter: true }); //force  false 为不覆盖 true会删除再创建; alter true可以 添加或删除字段;
    });
    router.get('/app/router/list', controller.router.index);
    router.post('/app/router/update', controller.router.update);
    router.post('/app/router/add', controller.router.created);
    router.get('/getMunu', controller.user.getMunu);
    router.get('/getUserInfo', controller.user.getUserInfo);
    // router.get('*', controller.router.webView);
    
    router.get('/article/cats', controller.cats.get)
    router.post('/article/cats/store', controller.cats.create)
    






    
};